package com.wj.hourupdate.datasource;

import com.wj.hourupdate.util.Logger;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public abstract class SQLiteDatasource {
	protected DatabaseHelper dbHelper;
	protected SQLiteDatabase db;
	protected Logger log;
	protected final String logFolder = "HourUpdateLog";
	
	public SQLiteDatasource(Context c){
		dbHelper = new DatabaseHelper(c);
		log = new Logger(c, logFolder, this.getClass().getName());
	}
	
	public void open(){
		db = dbHelper.getWritableDatabase();
	}
	
	public void close(){
		dbHelper.close();
	}
}
